<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>帮助</title>

    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>


</head>
<body>
<div id="blank" class="header">
    <div v-back.tapmode class="back"></div>
    <span class="title">帮助</span>
</div>
<div id="app" v-cloak class="top-container">
    <div class="row-container">
        <div class="row" v-for="help in helps" v-myclick="[help.essay_id, showEssay]" v-row-active>
            <span>{{help.title}}</span>
            <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
        </div>
    </div>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script>

    var helps;
    apiready = function () {
        setBSImg();
        new Vue({
            el: '#blank'
        });
        showProgress();
        var callback = function (ret) {
            helps = ret.content;
            initApp();
            api.parseTapmode();
        };
        pinet.get(URL.getHelpList, callback);

        addListeners();
    };

    function initApp() {
        new Vue({
            el: '#app',
            data: {
                helps: helps,
            },
            methods:{
                showEssay: function (essay_id) {
                    var url = URL.openEssayWeb + '?essay_id=' + essay_id;
                    openWin('../home/browser', {url: url});
                }
            }
        })
    }

    function addListeners() {
        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function (ret, err) {
            onPageEnd();
        });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            onPageEnd();
            api.closeWin();
        });
    }

</script>
</html>
